import sqlite3

conn = sqlite3.connect('../database.db')
conn.row_factory = sqlite3.Row

sql = 'CREATE TABLE IF NOT EXISTS "main"."gate_pass_info_index" ("secret_card" text(30), "table_index" INTEGER)'
conn.execute(sql)
conn.commit()

# l = ['7', '9', '1', 'd', '0', '2', '8', 'f', 'b', 'e', '3', '6', 'a', '5', '4', 'c']
# for i in l:
#     sql = 'CREATE TABLE IF NOT EXISTS "main"."gate_pass_info_index_{}" ("secret_card" text(30), "table_index" INTEGER)'.format(i)
#     result = conn.execute(sql)
#     print('create gate_pass_info_index_{}, affected row is {}'.format(i, result.rowcount))
#
# conn.commit()
